/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * The software in this package is published under the terms of the GPL v2.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE-GPL.txt file.
 */

package org.cemantika.metamodel.structure;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * AcquisitionAssociation represents the relationship between a {@link ContextualElement} and a
 * {@link ContextSource}.
 * 
 * @author andersonfellipe
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AcquisitionAssociation {
    /**
     * Represents the element of a {@link ContextualEntity} that this {@link ContextSource} is
     * responsible for.
     */
    String element();
    
    /**
     * Represents the type of acquisition and has a value of {@link AcquisitionType}.
     */
    AcquisitionType type();

    /**
     * Represents the frequency of update and has a value of {@link UpdateType}.
     */
    UpdateType updateFrequency();

    /**
     * Represents a transformation function or derivation rule used to convert a value received
     * from a {@link ContextSource} into a value compatible with the {@link ContextualElement}
     * described in the context model.
     */
    String matchingExpression() default "";
}
